import request from '@/utils/request'

//注册
const register_url= 'register';
export function mine_register(data) {
  return request({
    url: register_url,
    method: 'post',
    data
  })
}

//密码、验证码登录
const login_url_password= 'loginPassword';
export function mine_login_password(data) {
  return request({
    url: login_url_password,
    method: 'post',
    data
  })
}

//密码、验证码登录
const login_url_code= 'loginCode';
export function mine_login_code(data) {
  return request({
    url: login_url_code,
    method: 'post',
    data
  })
}

//微信登录
const login_url_wx= 'loginWx';
export function mine_login_wx(data) {
  return request({
    url: login_url_wx,
    method: 'post',
    data
  })
}

//qq登录
const login_url_qq= 'loginQq';
export function mine_login_qq(data) {
  return request({
    url: login_url_qq,
    method: 'post',
    data
  })
}

//更新我的信息
const info_url= 'updateUserApp';
export function updateUserApp(data) {
  return request({
    url: info_url,
    method: 'post',
    data
  })
}

//新增意见反馈
const feedback_url= 'minefeedback/add';
export function feedbackAdd(data) {
  return request({
    url: feedback_url,
    method: 'post',
    data
  })
}

//新增用户评价
const remark_url= 'mineremark/add';
export function remarkAdd(data) {
  return request({
    url: remark_url,
    method: 'post',
    data
  })
}

//获取我的消息
const message_url= 'MineMessageC/listMineMessage';
export function listMineMessage() {
  return request({
    url: message_url,
    method: 'get',
  })
}

//删除我的单条消息
const message_delete_url= 'MineMessageC/deleteMineMessage';
export function deleteMineMessage(data) {
  return request({
    url: message_delete_url,
    method: 'post',
    data
  })
}

//重置密码
const reset_pwd= 'sysResetPwd';
export function mine_resetPwd(data) {
  return request({
    url: reset_pwd,
    method: 'post',
    data
  })
}

//退出
const sysLogout= 'sysLogout';
export function mine_logout(data) {
  return request({
    url: sysLogout,
    method: 'post',
    data
  })
}

//获取我的账户
const getAccount= 'MineAccountC/getMineAccount';
export function mine_getAccount(data) {
  return request({
    url: getAccount,
    method: 'post'
  })
}

//充值我的账户
const updateAccount= 'MineAccountC/updateMineAccount';
export function mine_updateAccount(data) {
  return request({
    url: updateAccount,
    method: 'post',
    data
  })
}

//获取我的vp
const getVp= 'MineVipC/getMineVip';
export function mine_getVp(data) {
  return request({
    url: getVp,
    method: 'post'
  })
}

//充值我的vp
const updateVp= 'MineVipC/updateMineVip';
export function mine_updateVp(data) {
  return request({
    url: updateVp,
    method: 'post',
    data
  })
}

//获取我的积分
const getJf= 'MineIntegrationC/getMineIntegration';
export function mine_getIntegration(data) {
  return request({
    url: getJf,
    method: 'post'
  })
}
// 获取总积分和今日积分
const getTotal= '/api/PersonCenterInt/GetTotalPoint';
export function mine_getTotalBonus(data) {
  return request({
    url:getTotal,
    method: 'get',
    params: data
  })
}
// 我的积分列表
const getMyBonus= '/api/PersonCenterInt/GetPointList';
export function mine_getMyBonus(data) {
  return request({
    url: getMyBonus,
    method:'get',
    params: data
  })
}
// 我的收藏
const getMySave= '/api/PersonCenterInt/GetAimList';
export function getSaveList(query) {
  return request({
    url: getMySave,
    method: 'get',
    params: query
  })
}
// 我的推荐

const recommendUrl= '/api/PersonCenterInt/GetAimList';
export function getRecommendList(query) {
  return request({
    url: recommendUrl,
    method: 'get',
    params: query
  })
}
// 推荐向我
const recommendToMeUrl= '/api/PersonCenterInt/GetAimList';
export function getToMeList(query) {
  return request({
    url: recommendToMeUrl,
    method: 'get',
    params: query
  })
}
// 上传图片到服务器
export function uploadOneImg(data) {
  return request({
    url: '/api/PersonCenterInt/UploadFile',
    method: 'post',
    data
  })
}
// 意见反馈
const advanceUrl= '/api/PersonCenterInt/AddOpinions';
export function postAdvance(data) {
  return request({
    url: advanceUrl,
    method: 'post',
    data
  })
}
//获取签到状态
const getStateUrl= 'MineSignRecordC/getMineSign';
export function mine_getSignState(data) {
  return request({
    url: getStateUrl,
    method: 'post'
  })
}

//进行签到
const startSignUrl= 'MineSignRecordC/mineSignIn';
export function mine_startSign(data) {
  return request({
    url: startSignUrl,
    method: 'post',
    data
  })
}

//获取优惠券信息
const getGiftUrl= 'MineGiftC/getMineGift';
export function mine_getGift(data) {
  return request({
    url: getGiftUrl,
    method: 'post',
    data
  })
}


//积分兑换兑换优惠券
const dhUrl= 'MineIntegrationC/exchangeMineIntegrationGift';
export function mine_dhGift(data) {
  return request({
    url: dhUrl,
    method: 'post',
    data
  })
}

//获取推送状态
const getPushUrl= 'MineConfigC/getMineConfig';
export function mine_getPushState() {
  return request({
    url: getPushUrl,
    method: 'post',
  })
}

//开启或关闭推送
const startPushUrl= 'MineConfigC/updateMineConfig';
export function mine_startPush(data) {
  return request({
    url: startPushUrl,
    method: 'post',
    data
  })
}

//校验是否登录
const checkLogin= 'checkAppLogin';
export function mine_check_login() {
  return request({
    url: checkLogin,
    method: 'get'
  })
}

//获取短信验证码
const getLoginCode= 'getLoginCode';
export function get_mine_login_code(data) {
  return request({
    url: getLoginCode,
    method: 'post',
    data
  })
}

//获取短信验证码
const getRegisterCode= 'getRegisterCode';
export function get_mine_register_code(data) {
  return request({
    url: getRegisterCode,
    method: 'post',
    data
  })
}
